package cn.topevery.garden.dal.logic;

import cn.topevery.garden.dal.dao.GreTreeMoveLogDao;
import cn.topevery.garden.entity.po.GreTreeMoveLog;
import cn.topevery.garden.entity.query.GreTreeMoveLogQuery;
import cn.topevery.garden.entity.vo.GreTreeMoveLogVO;
import cn.topevery.garden.framework.base.BaseLogic;
import hw.topevery.framework.db.base.BaseEntityDao;
import hw.topevery.framework.db.entity.DataPager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 迁移记录表
 *
 * @author code-generate
 * @date 2022-02-27
 */
@Service
public class GreTreeMoveLogLogic extends BaseLogic<GreTreeMoveLog> {
    @Autowired
    GreTreeMoveLogDao greTreeMoveLogDao;

    @Override
    public BaseEntityDao<GreTreeMoveLog, Integer> getDao() {
        return greTreeMoveLogDao;
    }

    

    /**
     * 获取列表
     *
     * @param query
     */
    public DataPager<GreTreeMoveLogVO> listPage(GreTreeMoveLogQuery query) {
        return greTreeMoveLogDao.listPage(query);
    }

    /**
     * 根据自增id批量删除
     *
     * @param ids
     */
    public void deleteBatchById(String userId,Integer[] ids) {
        greTreeMoveLogDao.delete(userId, ids);
    }

    /**
     * 根据自增id保存或者更新
     *
     * @param greTreeMoveLog 实体
     */
    public void saveOrUpdate(String userId, GreTreeMoveLog greTreeMoveLog){
        greTreeMoveLogDao.saveOrUpdate(userId,greTreeMoveLog);
    }

    /**
         * 根据自定义列值来获取对象
         */
    public GreTreeMoveLog getEntityByColumn(String key, String value) {
        return greTreeMoveLogDao.getEntityByColumn(key, value);
    }
}
